gpginsttestdir = $(pkglibexecdir)/installed-tests/gpghome
gpginsttest_DATA = tests/gpghome/secring.gpg \
- tests/gpghome/pubring.gpg \
tests/gpghome/trustdb.gpg
+gpginsttest_trusteddir = $(pkglibexecdir)/installed-tests/gpghome/trusted
+gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg
+
+install-gpg-data-hook:
+ ln -s trusted/pubring.gpg $(DESTDIR)$(gpginsttestdir)/pubring.gpg
+INSTALL_DATA_HOOKS += install-gpg-data-hook
%.test: tests/%.sh Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
export G_DEBUG=fatal-warnings
export TEST_GPG_KEYID="472CDAFA"
-export TEST_GPG_HOME=${SRCDIR}/gpghome
-export OSTREE_GPG_HOME=${TEST_GPG_HOME}
+export TEST_GPG_KEYHOME=${SRCDIR}/gpghome
+export OSTREE_GPG_HOME=${TEST_GPG_KEYHOME}/trusted
if test -n "${OT_TESTS_DEBUG}"; then
set -x
setup_test_repository "archive-z2"
cd ${test_tmpdir}
-${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" --gpg-sign=${TEST_GPG_KEYID} --gpg-homedir=${TEST_GPG_HOME} --tree=dir=files
+${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" --gpg-sign=${TEST_GPG_KEYID} --gpg-homedir=${TEST_GPG_KEYHOME} --tree=dir=files
$OSTREE show --print-detached-metadata-key=ostree.gpgsigs test2 > test2-gpgsigs
# We at least got some content here and ran through the code; later
# tests will actually do verification
# Now sign a commit 3 times (with the same key)
cd ${test_tmpdir}
-${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" --gpg-sign=${TEST_GPG_KEYID} --gpg-sign=${TEST_GPG_KEYID} --gpg-sign=${TEST_GPG_KEYID} --gpg-homedir=${TEST_GPG_HOME} --tree=dir=files
+${OSTREE} commit -b test2 -s "A GPG signed commit" -m "Signed commit body" --gpg-sign=${TEST_GPG_KEYID} --gpg-sign=${TEST_GPG_KEYID} --gpg-sign=${TEST_GPG_KEYID} --gpg-homedir=${TEST_GPG_KEYHOME} --tree=dir=files
$OSTREE show --print-detached-metadata-key=ostree.gpgsigs test2 > test2-gpgsigs
assert_file_has_content test2-gpgsigs 'byte '